var Animation = function(canvas_id) {
	this.canvas_id = canvas_id;

	this.components = new Array();
	this.items = new Array();

	// ---------Start : change color for a skin----------

	// create new skin component
	this.componentChoiLM = new Component();

	// create new skin 1 item and set value for skin 1
	this.itemChoi = new GameItem("img/choilongmay.png");

	this.itemChoi.name = "skin";
	this.itemChoi.x = 0;
	this.itemChoi.y = 110;
	this.itemChoi.width = 20;
	this.itemChoi.height = 20;
	this.items.push(this.itemChoi);
	this.componentStar.items.push(this.itemChoi);
	this.componentStar.activeItem(this.itemChoi);

	this.itemStar2 = new GameItem("img/star.gif");

	// add hat component to components
	this.components.push(this.componentStar);

	// add hat component to components
	this.components.push(this.componentHat);

	// draw background
	this.image = new Image();
	this.image.src = "img/model_ground.png";

	// draw
	this.draw = function() {

		var gameCanvas = document.getElementById("gameCanvas");
		var graphic = gameCanvas.getContext('2d');
		graphic.clearRect(0, 0, gameCanvas.width, gameCanvas.height);

		graphic.drawImage(this.image, 0, 0);

		for ( var i = 0; i < this.components.length; i++) {
			this.components[i].draw(graphic);
		}

	};

	// change value of name img src
	this.changeImgSrc = function(nameImgSrc) {
		this.nameImgSrc = nameImgSrc;
		this.draw();
	};

};
